from core.JCB import Job


class Once:
    def __init__(self):
        self.jcb_list = []

    def reset(self):
        self.jcb_list = []

    def getJCBCount(self):
        return len(self.jcb_list)

    def addJCB(self, arrival_time, work_time):
        process = Job(name=len(self.jcb_list), arrival_time=int(arrival_time), service_time=int(work_time))
        self.jcb_list.append(process)

    def getJCBList(self):
        return self.jcb_list.copy()
        pass

